package org.example.B_100;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.stream.Collectors;

/**
 * 敏感字段加密
 */
public class SensitiveFieldEncryption {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //输入
        int index = Integer.parseInt(sc.nextLine());
        String str = sc.nextLine();

        //处理输入数据
        String result = getResult(index,str);

        //打印输出
        System.out.println(result);
    }

    public static String getResult(int index,String str){
        StringBuilder stack = new StringBuilder();
        LinkedList<String> result = new LinkedList<>();

        //遍历命令字符串
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);

            if(c == '_' && (stack.length() == 0 || stack.charAt(0) != '"')){
                result.add(stack.toString());
                stack  = new StringBuilder();
            }else if (c == '"' && stack.length() != 0 ){
                stack.append('"');
                result.add(stack.toString());
                stack = new StringBuilder();
            }else {
                stack.append(c);
            }
        }

        if (stack.length() > 0 ){
            result.add(stack.toString());
        }

        //去除空值
        List<String> ans = result.stream().filter(s -> !"".equals(s)).collect(Collectors.toList());

        if (index > ans.size() - 1){
            return "ERROR";
        }
        ans.set(index,"******");

        StringJoiner sj = new StringJoiner("_");
        for(String an : ans){
            sj.add(an);
        }

        return sj.toString();


    }
}
